/*****************************************************************************
 *
 *                      HUSONG PROPRIETARY INFORMATION
 *
 *          The information contained herein is proprietary to HUSONG
 *           and shall not be reproduced or disclosed in whole or in part
 *                    or used for any design or manufacture
 *              without direct written authorization from HUSONG.
 *
 *            Copyright (c) 2015 by HUSONG.  All rights reserved.
 *
 *****************************************************************************/
package com.broker.provider.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import me.send.broker.entity.UserEvaluate;
import me.send.broker.pojo.BrokerEvaluateBean;
import me.send.broker.pojo.UserEvaluateBean;
import me.send.broker.service.UserEvaluateService;
import me.send.framework.util.HelperUtil;

import com.broker.provider.base.BaseService;

/**
 * @author maxmin
 *
 * @date 2015年8月25日 下午4:59:04
 */
public class UserEvaluateServiceImpl extends BaseService implements
		UserEvaluateService {

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * me.send.broker.service.UserEvaluateService#addEvaluate(me.send.broker
	 * .entity.UserEvaluate)
	 */
	public int addEvaluate(UserEvaluate evaluate) {
		evaluate.setCreatetime(HelperUtil.getCurrentDate());
		evaluate.setUpdatetime(HelperUtil.getCurrentDate());
		return userEvaluateMapper.addUserEvaluate(evaluate);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see me.send.broker.service.UserEvaluateService#getEvaluates(int)
	 */
	public List<UserEvaluateBean> getEvaluates(int userid) {
		return userEvaluateMapper.getEvaluates(userid);
	}

	/* (non-Javadoc)
	 * @see me.send.broker.service.UserEvaluateService#getMyEvaluates(int)
	 */
	public List<BrokerEvaluateBean> getMyEvaluates(int brokerid,Long startId,int size) {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("brokerid", brokerid);
		params.put("startId", startId);
		params.put("size", size);
		return userEvaluateMapper.getMyEvaluates(params);
	}


}
